<?php
if(!$_GET['show'] == "") {
  if($_GET['show'] == "_allpages") {
    $header = "/all pages";
    $doctitle = $header;
    $content = "allpages.php";
  } else if($_GET['show'] == "_orphanpages") {
    $header = "/orphan pages";
    $doctitle = $headear;
    $content = "orphans.php";
  } else {  
    $content = "show.php";
    $header = "/".$_GET['show'];
    $doctitle = $header;
    $pagename = $_GET['show'];
  }
} else if(!$_GET['category'] == "") {
  if($_GET['category'] == "_allcategories") {
    $header = "/categories";
    $doctitle = $header;
    $content = "allcategories.php";
  } else {
    $header = "/<a href='?category=_allcategories'>categories</a>/".$_GET['category'];
    $doctitle = "/categories/".$_GET['category'];
    $content = "category.php";
  }
} else if(!$_GET['edit'] == "") {
  $content = "edit.php";
  $pagename = $_GET['edit'];
  $header = "/<a href='?show=$pagename'>$pagename</a>/edit";
  $doctitle = "/$pagename/edit";
} else if(!$_GET['special'] == "") {
  $header = "/".$_GET['special'];
  $doctitle = $header;
  $content = $_GET['special'].".php";
} else {
  $pagename = "main";
  $header = "/main";
  $doctitle = $header;
  $content = "show.php";
}
?>